/*
 * @Author: LiJia
 * @Date: 2021-03-04 13:31:17
 * @LastEditTime: 2021-03-25 11:07:18
 * @LastEditors: LiJia
 * @Description: Description
 * @FilePath: \class-manage-system\miniprogram\pages\components\common-foot\common-foot.ts
 */

Component({
  properties: {
    // modalHidden: {
    //   type: Boolean,
    //   value: true
    // }, //这里定义了modalHidden属性，属性值可以在组件使用时指定.写法为modal-hidden
    // modalMsg: {
    //   type: String,
    //   value: ' ',
    // }
  },
  data: {
    // currentPage: 'minePage'
    currentPage: 'sourcesPage'
  },
  methods: {
    // 这里放置自定义方法
    handlePageChange(event) {
      wx.showToast({
        title: event.target.dataset.option,
        icon: 'none',
        duration: 1000
      })
      this.setData({
        currentPage: event.target.dataset.option
      })
      this.triggerEvent("page-change", { currentPage: this.data.currentPage })
    }
  }
})
